package com.gmail.bogatyr.alexander;

import com.gmail.bogatyr.alexander.controller.GroupController;
import com.gmail.bogatyr.alexander.entity.Group;
import org.apache.log4j.Logger;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;

/**
 * This class represents...
 */
public class StartApp {

    //TODO how usr static classes in java ?

    private static Logger logger = Logger.getLogger(StartApp.class);

    public static void main(String[] args) {
        GroupController groupController = new GroupController();
        Long resCr = groupController.createGroup();
        logger.info("createGroup() -> " + resCr);
        Group resRe = groupController.readGroup();
        logger.info("readGroup() -> " + resRe);
        Collection<Group> groups = groupController.findAll();
        List<Group> groupList = Collections.emptyList();
        groupList = new ArrayList<Group>(groups);
        logger.info("findAll() -> " + groupList.size());
    }
}
